<script>
import GmTable from "@/view/components/gmTable.vue";

export default {
  components: {
    GmTable: GmTable
  },
  data() {
    return {
      tableConfig: {
        control: 't-school',
        mainKey: 'schoolCode', //数据主键，用于删除该条数据
        needDist: true,
      },
      tableColumns: [{
        name: 'schoolName',
        label: '学校名称',
        id: 'schoolName',
        search: true,
        required: false,
        searchType: 'input',
      }, {
        name: 'schoolCode',
        label: '学校编码',
        hide: true,
        addHide: true,
        id: 'schoolCode',
        search: false,
        required: false,
        searchType: 'input',
      }, {
        name: 'address',
        label: '学校地址',
        id: 'address',
        search: false,
        required: false,
        searchType: 'input',
        width:"300px",
      }, {
        name: 'districtCode',
        label: '学校区划',
        id: 'districtCode',
        search: false,
        required: '/t-district/findTreeAuth',
        hide: true,
        searchType: 'dict',
      },
        {
        name: 'districtName',
        label: '学校区划',
        id: 'districtName',
        search: false,
        addHide: true,
      },
        {
        name: 'educationStateName',
        label: '教育等级',
        id: 'educationStateName',
        search: true,
        searchType: 'select',
        required: '/common/getItem/education_level',
      }, {
        name: 'schoolBoardingArrangement',
        label: '学校居住安排',
        id: 'schoolBoardingArrangement',
        search: false,
        searchType: 'select',
        required: '/common/getItem/live',
      }, {
        name: 'isCreateStation',
        label: '同步添加站点',
        id: 'isCreateStation',
        search: false,
        hide: true,
        searchType: 'state',
      }, {
        name: 'createDate',
        label: '创建时间',
        id: 'createDate',
        search: false,
        searchType: 'state',
        addHide: true,
      }, {
        name: 'createUserName',
        label: '创建人',
        id: 'createUserName',
        search: false,
        searchType: 'state',
        addHide: true,
      }, {
        name: 'state',
        label: '状态',
        id: 'state',
        search: false,
        required: '/common/getItem/state',
        searchType: 'state',
      }],
    }
  },
}
</script>

<template>
  <div class="page-car">
    <gm-table :table-columns="tableColumns" :table-config="tableConfig"></gm-table>
  </div>
</template>

<style scoped>

</style>
